package com.hbnu.test.www.Exception_Test.TryTry01;

public class Solution {
    /**
     * @param num: The legal numbers passed in are required to be between 0 and 100,
     *              including 0 and 100
     * @throws MyException: Throwing our custom exception
     */
    public void validate(int num) throws MyException {
        // write your code here
        if((num < 0) || (num > 100)){
            throw new MyException("The number you entered is not legal");
        }
        else{
            System.out.println(num);
        }
    }
}